<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>我的订单</title>
<link rel="stylesheet" href="/static/css/style.css">
<style type="text/css">
	h1 {
		text-align: center;
		margin-top: 200px;
	}
</style>
</head>
<body>
	
	<div id="header">
			<img class="logo_img" alt="" src="static/img/logo.gif" >
			<span class="wel_word">我的订单</span>
			{{if .Userid}}
			<div>
				<span>欢迎<span class="um_span">{{.Username}}</span>光临尚硅谷书城</span>
				<a href="/toCart">购物车</a>
				<a href="/toMyOrders">我的订单</a>
				<a href="/logout">注销</a>&nbsp;&nbsp;
				<a href="/main">返回</a>
			</div>
			{{else}}
			<div>
				<a href="/login">登录</a> | 
				<a href="/register">注册</a> &nbsp;&nbsp;
				<a href="/toCart">购物车</a>
				<a href="/pages/manager/manager.html">后台管理</a>
				<a href="/main">返回</a>
			</div>
			{{end}}
	</div>
	
	<div id="main">
		
				{{if .Orders}}
				
				<table>
					<tr>
						<th>单号</th>
						<th>日期</th>
						<th>数量</th>
						<th>金额</th>
						<th>详情</th>
						<th>发货</th>
						
					</tr>
					{{range .Orders}}
						<tr>
							<td>
								{{.Id}}
							</td>
							<td>{{.CreateTime}}</td>
							<td>{{.Tcount}}</td>
							<td>{{.Tamout}}</td>
							<td><a href="/toOrderItem?orderid={{.Id}}">查看详情</a></td>
							<td>
								{{if .NoSend}}
								
										未发货
								{{end}}	
								{{if .Sended}}
										<a href="/toTakeOrders?orderid={{.Id}}">确认收货</a>
								{{end}}	
								{{if .Completed}}
										<span>交易结束</span>
								{{end}}
							</td>
						</tr>	
				{{end}}
				</table>
				{{else}}
				<h1>当前用户还没有订单！</h1>
				
				{{end}}
	
	</div>
	
	<div id="bottom">
		<span>
			尚硅谷书城.Copyright &copy;2015
		</span>
	</div>
</body>
</html>